package com.example.weixin_01.test.design_model.responsibility;

/**
 * @author zhenghuisheng
 * @date : 2022/9/16
 * 管理员类，负责将资源整合并创建
 */
public class CourseManager {

    //资源构建器
    private CourseBuilder courseBuilder;


    //获取这个资源构建器
    public void setCourseBuilder(CourseBuilder courseBuilder ){
        this.courseBuilder = courseBuilder;
    }

    //返回这个构造器
    public Course getCourse(String courseName,String coursePPT,String courseVideo,String courseTitle,String courseQA){
        this.courseBuilder.buildCourseName(courseName);
        this.courseBuilder.buildCoursePPT(coursePPT);
        this.courseBuilder.buildCourseVideo(courseVideo);
        this.courseBuilder.buildCourseTitle(courseTitle);
        this.courseBuilder.buildCourseQA(courseQA);

        return courseBuilder.makeCourse();
    }


}

